// 按需加载
import Vue from 'vue'

import {
  NavBar, Form, Field, Button, Tabbar, TabbarItem,
  Icon, Tab, Tabs, Cell, List, PullRefresh, ActionSheet,
  Popup, Row, Col, Badge, Search, Image as VanImage, Divider,
  Tag, CellGroup, Dialog, DatetimePicker, Loading, Lazyload
} from 'vant'

Vue.use(NavBar)
Vue.use(Form)
Vue.use(Field)
Vue.use(Button)
Vue.use(Tabbar)
Vue.use(TabbarItem)
Vue.use(Icon)
Vue.use(Tab)
Vue.use(Tabs)
Vue.use(Cell)
Vue.use(List)
Vue.use(PullRefresh)
Vue.use(ActionSheet)
Vue.use(Popup)
Vue.use(Row)
Vue.use(Col)
Vue.use(Badge)
Vue.use(Search)
Vue.use(VanImage)
Vue.use(Divider)
Vue.use(Tag)
Vue.use(CellGroup)
Vue.use(Dialog)
Vue.use(DatetimePicker)
Vue.use(Loading)
// 懒加载图片失败，使用错误图片
Vue.use(Lazyload, {
  // 屏幕高度的范围百分比是0-1,预加载范围
  preLoad: 0.8,
  error: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fp7.itc.cn%2Fimages01%2F20210417%2Fc6ac2707a6ad4451b8da7b0ff3e32bbc.png&refer=http%3A%2F%2Fp7.itc.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1654775806&t=d26b479acffac1f7384d6cf70e958525'
})
